package com.cirkana.viewer.qr.model;

import jp.sourceforge.qrcode.QRCodeDecoder;
import android.graphics.Bitmap;

public class QRController {

	public static String decodeQR(Bitmap bitmap) throws QRException {
		try {
			QRCodeImageAndroid image = new QRCodeImageAndroid(bitmap);
			QRCodeDecoder decoder = new QRCodeDecoder();
			return new String(decoder.decode(image));
		} catch (Exception e) {
			throw new QRException("Unable to get QR code information", e);
		}
	}

}
